
import HttpClient from '../utils/request';

import type { informationReqType, informationResType, informationReqStateType ,informationResDataType,informationFormReqType} from '../types/informationType';

// 获取用户列表
export const getinformationList = (e: informationReqType) => {
    return HttpClient.request<informationResType>({
        url: '/platform/information/getInformationList',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 上下架
export const updateinformationStatus = (e: informationReqStateType) => {
    return HttpClient.request({
        url: '/platform/information/updateInformationStatus',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 获取详细
export const getinformationDetail = (e: {informationId:number}) => {
    return HttpClient.request<informationResDataType>({
        url: '/platform/information/getInformationDetail',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 新增
export const createinformation = (e: informationFormReqType) => {
    console.log(e)
    return HttpClient.request({
        url: '/platform/information/createInformation',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 编辑
export const updateinformation = (e: informationFormReqType) => {
    console.log(e)
    return HttpClient.request({
        url: '/platform/information/updateInformation',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}








